<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<div class="table-responsive">
    <table class="table table-bordered">
        <thead>
        <tr>
            <th class="text-center"><div class="table-first-id">ID</div></th>
            <th class="text-center" width="25%">链接名</th>
            <th class="text-center" width="20%">链接类型</th>
            <th class="text-center" width="15%">状态</th>
            <th class="text-center" width="15%">创建时间</th>
            <th class="text-center" width="15%">操作</th>
        </tr>
        </thead>
    </table>
    <div class="J_V_tabContent table-xScrollWrap">
        <table class="table table-bordered table-hover table-xs-content">
            <tbody>
                <tr class="jqgfirstrow" role="row">
                    <th class="text-center"><div class="table-first-id">&nbsp;</div></th>
                    <th class="text-center" width="25%">&nbsp;</th>
                    <th class="text-center" width="20%">&nbsp;</th>
                    <th class="text-center" width="15%">&nbsp;</th>
                    <th class="text-center" width="15%">&nbsp;</th>
                    <th class="text-center" width="15%">&nbsp;</th>
                </tr>
                <tr>
                    <td th:if="${#lists.isEmpty(linkConfigList)}" colspan="6" class="text-center">
                        <div class="noDataTipsBox">
                            <p><span class="c-4e fs16">亲，还没有数据~~~</span></p>
                        </div>
                    </td>
                </tr>
                <th:block th:if="!${#lists.isEmpty(linkConfigList)}" th:each="linkConfig : ${linkConfigList}">
                    <tr th:attr="id='link-config-tr-'+${linkConfig['id']}" th:attrappend="data-id=${linkConfig['id']},data-name=${linkConfig['linkName']}">
                        <td class="text-center">
                            <input type="checkbox" class="i-checks" name="linkConfigId" th:value="${linkConfig['id']}" />
                        </td>
                        <td th:text="${linkConfig['linkName']}"></td>
                        <td class="text-center">
                            <span th:if="${linkConfig['linkType']}=='navigation'">平台PC顶部导航链接</span>
                            <span th:if="${linkConfig['linkType']}=='friendship_link'">平台底部友情链接</span>
                            <span th:if="${linkConfig['linkType']}=='bottom_tag'">平台底部帮助链接</span>
                        </td>
                        <td class="text-center" th:attr="id='link-config-status-'+${linkConfig['id']}">
                            <span th:if="${linkConfig['status']}==1" class="label label-info">正常</span>
                            <span th:if="${linkConfig['status']}==2" class="label label-danger">禁用</span>
                        </td>
                        <td class="text-center" th:text="${linkConfig['createTime']}">
                        </td>
                        <td class="text-center">
                            <a th:href="@{/admin/manage/link/initUpdate?id={id}(id=${linkConfig['id']})}" class="c-master fs14" data-toggle="tooltip" data-placement="bottom" data-original-title="修改">
                                <i class="fa fa-edit"></i>
                            </a>
                            <a href="javascript:void(0);" class="update-status c-master fs14 ml5" th:attr="data-id=${linkConfig['id']}" data-status=3 data-toggle="tooltip" data-placement="bottom" data-original-title="删除">
                                <i class="fa fa-trash-o"></i>
                            </a>
                            <a th:if="${linkConfig['status']}==1" href="javascript:void(0);" class="update-status c-master fs14 ml5" th:attr="id='simple-status-'+${linkConfig['id']}" th:attrappend="data-id=${linkConfig['id']}" data-status=2 data-toggle="tooltip" data-placement="bottom" data-original-title="禁用">
                                <i class="fa fa-unlock-alt"></i>
                            </a>
                            <a th:if="${linkConfig['status']}==2" href="javascript:void(0);" class="update-status c-master fs14 ml5" th:attr="id='simple-status-'+${linkConfig['id']}" th:attrappend="data-id=${linkConfig['id']}" data-status=1 data-toggle="tooltip" data-placement="bottom" data-original-title="恢复">
                                <i class="fa fa-history"></i>
                            </a>
                            <a th:href="@{/admin/manage/link/initAdd?parentId={parentId}&linkType={linkType}(parentId=${linkConfig['id']},linkType=${linkConfig['linkType']})}" class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="添加子级导航">
                                <i class="fa fa-plus-square"></i>
                            </a>
                        </td>
                    </tr>
                    <tr th:if="!${#lists.isEmpty(linkConfig['childLinkConfigList'])}" th:each="child : ${linkConfig['childLinkConfigList']}" th:attr="id='link-config-tr-'+${child['id']}" th:attrappend="data-id=${child['id']},data-name=${child['linkName']}">
                        <td class="text-center">
                            <input type="checkbox" class="i-checks" name="linkConfigId" th:value="${child['id']}" />
                        </td>
                        <td th:text="${linkConfig['linkName']}+'—>'+${child['linkName']}+'[子级导航]'"></td>
                        <td class="text-center">
                            <span th:if="${child['linkType']}=='navigation'">平台PC顶部子级导航链接</span>
                            <span th:if="${child['linkType']}=='friendship_link'">平台底部友情链接</span>
                            <span th:if="${child['linkType']}=='bottom_tag'">平台底部帮助链接</span>
                        </td>
                        <td class="text-center" th:attr="id='link-config-status-'+${child['id']}">
                            <span th:if="${child['status']}==1" class="label label-info">正常</span>
                            <span th:if="${child['status']}==2" class="label label-danger">禁用</span>
                        </td>
                        <td class="text-center" th:text="${child['createTime']}">
                        </td>
                        <td class="text-center">
                            <a th:href="@{/admin/manage/link/initUpdate?id={id}(id=${child['id']})}" class="c-master fs14" data-toggle="tooltip" data-placement="bottom" data-original-title="修改">
                                <i class="fa fa-edit"></i>
                            </a>
                            <a href="javascript:void(0);" class="update-status c-master fs14 ml5" th:attr="data-id=${child['id']}" data-status=3 data-toggle="tooltip" data-placement="bottom" data-original-title="删除">
                                <i class="fa fa-trash-o"></i>
                            </a>
                            <a th:if="${child['status']}==1" href="javascript:void(0);" class="update-status c-master fs14 ml5" th:attr="id='simple-status-'+${child['id']}" th:attrappend="data-id=${child['id']}" data-status=2 data-toggle="tooltip" data-placement="bottom" data-original-title="禁用">
                                <i class="fa fa-unlock-alt"></i>
                            </a>
                            <a th:if="${child['status']}==2" href="javascript:void(0);" class="update-status c-master fs14 ml5" th:attr="id='simple-status-'+${child['id']}" th:attrappend="data-id=${child['id']}" data-status=1 data-toggle="tooltip" data-placement="bottom" data-original-title="恢复">
                                <i class="fa fa-history"></i>
                            </a>
                        </td>
                    </tr>
                </th:block>
            </tbody>
        </table>
    </div>
</div>
</html>
